﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Scoreboard.Interfaces;
using Scoreboard.Basement;
using Scoreboard.Basement.Views;

namespace Scoreboard.Tournaments
{
	public partial class Page : PageBase
	{
		public Page()
		{
			InitializeComponent();

			var tournamentRepository = ServiceLocator.Get<ITournamentRepository>();
			var userRepository = ServiceLocator.Get<IUserRepository>();
			var gameRepository = ServiceLocator.Get<IGameRepository>();

			ViewModel = new ViewModel(tournamentRepository, userRepository, gameRepository);
		}

		private void lbxTournaments_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			tournament.Reset();
		}		
	}
}
